<template>
    <div class="user-center">
        <van-nav-bar title="用户中心" left-arrow @click-left="goBack"></van-nav-bar>
        <div class="content">
            <section>
                <van-cell title="平台账号" value="+86 155*****269" />
                <van-cell title="身份认证" is-link value="未认证" :to="{name:'identityAuthentication'}"/>
                <van-cell title="密码设置" is-link :to="{name:'passwordSetting'}"/>
                <van-cell title="账户设置" is-link :to="{name:'accountSetting'}"/>
            </section>
            <div class="login-out">
                <button type="submit" class="submit-btn" @click="logOut">退出登录</button>
            </div>
        </div>
    </div>
</template>
<script>
import Vue from "vue"
import axios from "axios"
import {
    NavBar,
    Cell,
    CellGroup
} from "vant"
export default {
    components: {
        [NavBar.name]: NavBar,
        [Cell.name]: Cell,
        [CellGroup.name]: CellGroup
    },
    data() {
        return {

        }
    },
    methods: {
        //返回上一页
        goBack() {
            this.$router.go(-1);
        },
        logOut() {
            this.$store.commit("logOut");
            this.$router.push({name: "mine"});
        }
    }
}
</script>
<style lang="less" scoped>
@import "../../assets/less/variable.less";
.van-cell__title {
    text-align: left;
}
.van-cell::after {
    content: ' ';
    position: absolute;
    pointer-events: none;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    left: 0;
    right: 0;
    bottom: 0;
    -webkit-transform: scaleY(.5);
    transform: scaleY(.5);
    border-bottom: 1px solid #ebedf0;
}
.user-center {
    background: #fff;
    .content {
        .login-out {
            margin-top: .67rem;
            width: 100%;
            background-color: #fff;
            color: #fff;
            font-size: @base_textSize;
            .submit-btn {
                padding: 10px;
                width: 90%;
                height: 1.07rem;
                border: 0;
                border-radius: 3px;
                background: #ff976a;
                outline: none;
            }
        }
    }
}
</style>
